//package cn.jekun.shop.web.action;
//
//import java.util.ArrayList;
//import java.util.List;
//
//import javax.annotation.Resource;
//
//import net.sf.json.JSONObject;
//import cn.jekun.component.base.bean.ErrorMsg;
//import cn.jekun.component.base.exceptions.BusinessException;
//import cn.jekun.component.core.bean.gen.ErpCartAttr;
//import cn.jekun.component.shop.bean.Goods;
//import cn.jekun.shop.common.service.DriveServicesService;
//import cn.jekun.shop.common.service.ShopBaseAction;
//
//public class DriveServicesAction extends ShopBaseAction{
//	
//	@Resource(name=DriveServicesService.BEAN_NAME)
//	DriveServicesService driveServicesService;
//	
//	private List<Goods> goods  = new ArrayList<Goods>();
//	private List<ErpCartAttr> attrs = new ArrayList<ErpCartAttr>();
//	
//	public List<ErpCartAttr> getAttrs() {
//		return attrs;
//	}
//
//	public void setAttrs(List<ErpCartAttr> attrs) {
//		this.attrs = attrs;
//	}
//
//	public List<Goods> getGoods() {
//		return goods;
//	}
//
//	public void setGoods(List<Goods> goods) {
//		this.goods = goods;
//	}
//
//	/**
//	 * 将页面数据保存至购物车并提交订单
//	 */
//	public String savaStringToOrder(){
//		JSONObject jsonObject = null;
//		try {
//			//this.validateSign(this.getLoginSign(),this.getUserId());
//			//this.validateLogin(); //登录验证
//			jsonObject = this.driveServicesService.savaStringToOrder(getUserId(), goods, attrs);
//			
//			this.logService.addMallLog(this.getUserId(), 
//					this.getBrowser(), this.getIp(), "保存至购物车并提交订单成功,来源:web,用户代码:"+this.getUserId());//记录操作日志
//
//		} catch (BusinessException e) {
//			jsonObject = JSONObject.fromObject(e.getErrorMsg());
//			
//			this.logService.addMallLog(this.getUserId(), 
//					this.getBrowser(), this.getIp(), "保存至购物车并提交订单失败,原因:"+jsonObject.get("message")+",来源:web,用户代码:"+this.getUserId());//记录操作日志
//
//		} catch (Exception e) {
//			jsonObject = JSONObject.fromObject(new ErrorMsg(e.getMessage()));
//			e.printStackTrace();
//		}
//		return this.writeJson(jsonObject);// 输出
//	}
//
//}
